package io.geekidea.boot.baiwang.controller;

import io.geekidea.boot.baiwang.dto.common.Result;
import io.geekidea.boot.baiwang.dto.FastRedRequest;
import io.geekidea.boot.baiwang.service.FastRedService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/fastRed")
@RequiredArgsConstructor
@Slf4j
public class FastRedController {

    @Resource
    private FastRedService fastRedService;

    /**
     * 发票冲红
     * @param fastRedRequest
     * @return
     */
    @PostMapping()
    public Result queryDataById(@RequestBody FastRedRequest fastRedRequest) {
        log.info("红冲请求参数：{}", fastRedRequest);
        return fastRedService.fastRed(fastRedRequest);
    }
}
